@echo off 
if exist "c:\windows\temp\restore.done" (
    echo Restore.done found. Proceed to write custom fields.
    exit 0
) else (
    echo Restore.done not found. Will check again at next heartbeat.
    exit 1
)